/**
 * @file
 * @auth jinguangguo
 * @date 20117/1/23
 */

import Vue from 'vue';
import VueI18n from 'vue-i18n';

import './base/init';
import CircleBall from '../component/CircleBall.vue';
import LangPopover from '../component/LangPopover.vue';
import Register from '../module/register/main';
import RegisterConfirm from '../module/register/RegisterConfirm.vue';
import messages from '../module/register/lang';

Vue.use(VueI18n);

let i18n =  new VueI18n({
    locale: window.app.LANG,
    messages, // set locale messages
});


const router = new VueRouter({
    'routes': [
        {
            path: '/',
            name: 'Register',
            component: Register
        },
        {
            path: '/confirm',
            name: 'RegisterConfirm',
            component: RegisterConfirm
        }
    ]
});

const app = new Vue({
    router,
    i18n,
    components: {
        LangPopover,
        Register,
        CircleBall
    }
}).$mount('#app');
